package mq.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Topic;

@Configuration
public class ActiveMqConfig {
    // 创建队列对象
    @Bean("bootQueue")
    public ActiveMQQueue bootQueue(){
        return new ActiveMQQueue("boot_queue");
    }

    @Bean("topicQueue")
    public Topic topicQueue(){
        return new ActiveMQTopic("topic_queue");
    }

}
